Skip to content

Fix manylinux NuGet publish date and remove deprecated ubuntu packages#1845

Merged
shimat merged 3 commits intomainfrom
fix_linux_nuget
Mar 18, 2026
Merged

Fix manylinux NuGet publish date and remove deprecated ubuntu packages#1845
shimat merged 3 commits intomainfrom
fix_linux_nuget

Conversation

@shimat
Copy link
Owner

@shimat shimat commented Mar 18, 2026

  • Fix stale build date on OpenCvSharp4.official.runtime.linux-x64 packages by downloading the pre-built nuget-packages-manylinux artifact in publish_nuget.yml instead of repacking with the publish-time .so
  • Remove 4 deprecated ubuntu.* csproj files (superseded by manylinux)
  • Update docs to reference linux-x64 packages

Summary by CodeRabbit

  • Documentation

    • Recommend Linux x64 runtime packages as the primary Linux option; Ubuntu 22.04/24.04-specific guidance removed. Slim variants noted for smaller footprint.
  • Chores / Packaging

    • Ubuntu 22.04 and 24.04 NuGet runtime packages removed; use consolidated Linux x64 packages.
  • Reliability

    • Improved build/publish validation and per-package publish reporting to make package uploads and artifact availability more reliable and transparent.

@shimat shimat self-assigned this Mar 18, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 64d3f258-0a43-4e56-b472-d4868d5d9b84

📥 Commits

Reviewing files that changed from the base of the PR and between 9af93f9 and 4237c5c.

📒 Files selected for processing (1)
  • .github/workflows/manylinux.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/manylinux.yml

📝 Walkthrough

Walkthrough

Consolidates manylinux OpenCV artifact caching and validation, adds runtime layout and disk-usage logging, refactors NuGet publish steps to per-package push with result aggregation, removes Ubuntu-specific runtime NuGet projects, and updates docs to prefer linux-x64 runtime packages. (43 words)

Changes

Cohort / File(s) Summary
Manylinux CI (OpenCV artifacts)
.github/workflows/manylinux.yml
Unified cache paths to opencv_artifacts/opencv_artifacts_slim, added runtime layout inspection and disk usage logging, and conditional cache-save steps that verify OpenCVConfig.cmake presence and fail when missing (full and slim).
NuGet publish workflow
.github/workflows/publish_nuget.yml
Removed Ubuntu 22.04/24.04 artifact download steps, added manylinux artifact download, and refactored NuGet push into a per-package helper that collects per-package results, updates a Markdown summary, and fails if any push fails.
Removed Ubuntu runtime packages
nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.csproj, nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.slim.csproj, nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.csproj, nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.slim.csproj
Deleted four distro-specific Ubuntu runtime NuGet project files and their packaging metadata/assets (deprecated Ubuntu-specific runtime packages removed).
Docs update
docs/docfx/articles/intro.md
Replaced Ubuntu 24.04-specific runtime recommendation with a Linux x64 runtime binding recommendation (and adjusted commented slim variant).

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Developer as Developer
participant GitHubActions as GitHub Actions (Workflow)
participant ArtifactStore as Artifacts / Cache
participant ManylinuxBuilder as manylinux job
participant NuGetOrg as nuget.org
rect rgba(220,240,255,0.5)
Developer->>GitHubActions: push PR or main
GitHubActions->>ManylinuxBuilder: run manylinux build (restore cache from ArtifactStore)
ManylinuxBuilder->>ArtifactStore: read/write opencv_artifacts
ManylinuxBuilder->>ManylinuxBuilder: inspect layout, log disk usage, verify OpenCVConfig.cmake
ManylinuxBuilder->>ArtifactStore: save cache conditionally (only on main, if miss, and verification passed)
end
rect rgba(220,255,220,0.5)
GitHubActions->>ArtifactStore: download manylinux artifact in prepare job
GitHubActions->>NuGetOrg: for each package -> push via helper, collect result (pushed/failed)
NuGetOrg-->>GitHubActions: per-package result
GitHubActions->>GitHubActions: summarize results; fail if any failed
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix manylinux NuGet publish date and remove deprecated ubuntu packages' directly and clearly describes the two main changes in the PR: fixing the publish date issue for manylinux NuGet packages and removing Ubuntu-specific package configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_linux_nuget
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/docfx/articles/intro.md (1)

12-12: ⚠️ Potential issue | 🟡 Minor

Inconsistency: Supported Platforms section still references Ubuntu versions.

Line 12 lists "Ubuntu 22.04, 24.04" but this PR removes the Ubuntu-specific packages in favor of generic linux-x64 bindings. Consider updating this line to reflect the change.

📝 Suggested fix
-- **Linux**: Ubuntu 22.04, 24.04, ARM
+- **Linux**: x64 (glibc 2.28+), ARM
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docfx/articles/intro.md` at line 12, Update the Supported Platforms text
to remove Ubuntu-specific wording and reference the new generic Linux bindings:
replace "Linux: Ubuntu 22.04, 24.04, ARM" with something like "Linux
(linux-x64), ARM" or "Linux (linux-x64) and ARM" in the Supported Platforms /
intro section so it reflects the switch from Ubuntu-specific packages to generic
linux-x64 bindings.
🧹 Nitpick comments (2)
.github/workflows/manylinux.yml (2)

155-170: Consider clarifying step names for readability.

The step at line 155 is named "Save OpenCV cache (full)" but performs validation, while line 165 "Save OpenCV cache (full) - upload" does the actual cache save. This split is functionally correct (validation failure prevents upload), but the naming could be clearer.

📝 Suggested rename for clarity
-      - name: Save OpenCV cache (full)
+      - name: Validate OpenCV install (full)
         if: steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
         run: |
           config=$(find ${GITHUB_WORKSPACE}/opencv_artifacts -name 'OpenCVConfig.cmake' | head -1)
           ...
         shell: bash
-      - name: Save OpenCV cache (full) - upload
+      - name: Save OpenCV cache (full)
         if: steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/manylinux.yml around lines 155 - 170, Rename the two steps
so their names reflect their intent: change the first step currently named "Save
OpenCV cache (full)" (the validation block that checks for OpenCVConfig.cmake)
to something like "Validate OpenCV artifacts (before cache save)" and keep or
change the second step "Save OpenCV cache (full) - upload" to "Save OpenCV cache
(full)" or "Upload OpenCV cache (full)"; update only the name fields in the YAML
so the validation step clearly indicates it’s a check and the later step clearly
indicates it performs the cache upload.

245-260: Same naming suggestion applies to slim build validation/upload split.

For consistency with any changes made to the full build steps.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/manylinux.yml around lines 245 - 260, Rename the slim
cache steps and keys to mirror the naming convention used for the full build
steps so they stay consistent; update the step names "Save OpenCV cache (slim)"
and "Save OpenCV cache (slim) - upload" and the cache key string "opencv-${{
env.OPENCV_VERSION }}-manylinux2_28-slim-${{
hashFiles('cmake/opencv_build_options_slim.cmake') }}" to match the same pattern
used by the full build (e.g., replace or align the "-slim" suffix/label and any
prefix differences), and ensure the if conditions and path (${{ github.workspace
}}/opencv_artifacts_slim) remain correct after renaming.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs/docfx/articles/intro.md`:
- Line 12: Update the Supported Platforms text to remove Ubuntu-specific wording
and reference the new generic Linux bindings: replace "Linux: Ubuntu 22.04,
24.04, ARM" with something like "Linux (linux-x64), ARM" or "Linux (linux-x64)
and ARM" in the Supported Platforms / intro section so it reflects the switch
from Ubuntu-specific packages to generic linux-x64 bindings.

---

Nitpick comments:
In @.github/workflows/manylinux.yml:
- Around line 155-170: Rename the two steps so their names reflect their intent:
change the first step currently named "Save OpenCV cache (full)" (the validation
block that checks for OpenCVConfig.cmake) to something like "Validate OpenCV
artifacts (before cache save)" and keep or change the second step "Save OpenCV
cache (full) - upload" to "Save OpenCV cache (full)" or "Upload OpenCV cache
(full)"; update only the name fields in the YAML so the validation step clearly
indicates it’s a check and the later step clearly indicates it performs the
cache upload.
- Around line 245-260: Rename the slim cache steps and keys to mirror the naming
convention used for the full build steps so they stay consistent; update the
step names "Save OpenCV cache (slim)" and "Save OpenCV cache (slim) - upload"
and the cache key string "opencv-${{ env.OPENCV_VERSION
}}-manylinux2_28-slim-${{ hashFiles('cmake/opencv_build_options_slim.cmake') }}"
to match the same pattern used by the full build (e.g., replace or align the
"-slim" suffix/label and any prefix differences), and ensure the if conditions
and path (${{ github.workspace }}/opencv_artifacts_slim) remain correct after
renaming.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0f55995d-1ac3-47be-a3b8-191659650ae5

📥 Commits

Reviewing files that changed from the base of the PR and between 7732912 and 9af93f9.

📒 Files selected for processing (7)
  • .github/workflows/manylinux.yml
  • .github/workflows/publish_nuget.yml
  • docs/docfx/articles/intro.md
  • nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.slim.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.slim.csproj
💤 Files with no reviewable changes (4)
  • nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.22.04-x64.slim.csproj
  • nuget/OpenCvSharp4.official.runtime.ubuntu.24.04-x64.slim.csproj

@shimat shimat merged commit 6141299 into main Mar 18, 2026
8 checks passed
@shimat shimat deleted the fix_linux_nuget branch March 18, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant